﻿@model INNOVACALL.Framework.Common.Models.ViewModels.MetaModels.LayoutMenus.LayoutMenu_Translation_MetaModel
@{
    string FieldSetId = string.Format("LanguageEditor{0}", Model.LanguageIndex);    
}
<fieldset class="ui-widget ui-widget-content ui-corner-all bottomMargin10" id="@FieldSetId">
    <legend></legend>
    <img src="@Model.Language.Flag" alt="@Model.Language.Flag" class="MenuItemFlag"/>
    @Html.HiddenFor(m => m.Id)
    @Html.HiddenFor(m => m.FK_LayoutMenu)
    @Html.HiddenFor(m => m.Language.Language)
    @Html.HiddenFor(m => m.Language.Flag)
    @Html.HiddenFor(m => m.OriginalDirectURL)
    @Html.HiddenFor(m => m.LevelCount)
    @Html.HiddenFor(m => m.LanguageIndex)
    @Html.HiddenFor(m => m.SortIndex)
    @Html.HiddenFor(m => m.LayoutMenuTranslationLayoutMenuParent)
    <ol class="MenuItemsProps">
        <li class="liPageTitle">
            @Html.LabelFor(m => m.PageTitle)
            @Html.TextBoxFor(m => m.PageTitle)
            @Html.ValidationMessageFor(m => m.PageTitle)
        </li>
        @if (Model.Language.Language == "zh-cn")
        { 
            <li class="liPageTitle">
                <label for="Translations_zh_cn__PageTitle">@INNOVACALL.Framework.Common.Properties.Resources.View_LayoutMenuEditor_USPageTitle</label>
                @Html.TextBox("zh_cnPageTitle", "", new { @id = "Translations_zh_cn__PageTitle" })
            </li>
        }
        <li class="liButtonCaption">
            @Html.LabelFor(m => m.ButtonCaption)
            @Html.TextBoxFor(m => m.ButtonCaption)
            @Html.ValidationMessageFor(m => m.ButtonCaption)
        </li>
        @if (Model.Language.Language == "zh-cn")
        {
            <li class="liButtonCaption">
                <label for="Translations_zh_cn__ButtonCaption">@INNOVACALL.Framework.Common.Properties.Resources.View_LayoutMenuEditor_USButtonCaption</label>
                @Html.TextBox("zh_cnButtonCaption", "", new { @id = "Translations_zh_cn__ButtonCaption" })
            </li>
        }
        <li class="liActive">
            <div>
                @Html.LabelFor(m => m.Active)
                @Html.EditorFor(m => m.Active)
                @Html.ValidationMessageFor(m => m.Active)
            </div>
        </li>
        <li class="liButtonToolTip">
            @Html.LabelFor(m => m.ButtonToolTip)
            @Html.TextBoxFor(m => m.ButtonToolTip)
            @Html.ValidationMessageFor(m => m.ButtonToolTip)
        </li>
        <li>
            @Html.LabelFor(m => m.CssClass)
            @Html.TextBoxFor(m => m.CssClass)
            @Html.ValidationMessageFor(m => m.CssClass)
        </li>
        <li class="liFinalAddress">
            <fieldset class="ui-widget ui-widget-content ui-corner-all bottomMargin10 FinalAddress">
                <label class="finalAddressLabel">@INNOVACALL.Framework.Common.Properties.Resources.View_LayoutMenu_Translation_FinalAddress</label>
                <table class="tblFinalUrl">
                    <tr>
                        <td class="Slash tdLabel"></td>
                        <td class="Lang tdLabel">
                            @Html.LabelFor(m => m.Language)
                        </td>
                        <td class="Slash tdLabel"></td>
                        <td class="Ancestors tdLabel hiddenForIndex">
                            @Html.LabelFor(m => m.Ancestors)
                        </td>
                        <td class="Slash tdLabel  hiddenForIndex"></td>
                        <td class="MenuName tdLabel hiddenForIndex">
                            @Html.LabelFor(m => m.MenuNameURLFormatted)
                        </td>
                        <td class="Slash tdLabel hiddenForIndex"></td>
                        <td class="PageName tdLabel">
                            @Html.LabelFor(m => m.PageNameURLFormatted)
                        </td>
                        <td class="Suffix tdLabel"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td class="linker"></td>
                        <td></td>
                        <td class="linker hiddenForIndex"></td>
                        <td class="hiddenForIndex"></td>
                        <td class="linker hiddenForIndex"></td>
                        <td class="hiddenForIndex"></td>
                        <td class="linker" colspan="2"></td>
                    </tr>
                    <tr>
                        <td class="Slash">/
                        </td>
                        <td class="Lang">
                            @Html.TextBoxFor(m => m.Language.Language, new { @readonly = "readonly" })
                        </td>
                        <td class="Slash">/
                        </td>
                        <td class="Ancestors hiddenForIndex">
                            @Html.TextBoxFor(m => m.Ancestors, new { @readonly = "readonly" })
                        </td>
                        <td class="Slash hiddenForIndex">/
                        </td>
                        <td class="MenuName hiddenForIndex">
                            @Html.TextBoxFor(m => m.MenuNameURLFormatted, new { @readonly = "readonly" })
                        </td>
                        <td class="Slash hiddenForIndex">/
                        </td>
                        <td class="PageName">
                            @Html.TextBoxFor(m => m.PageNameURLFormatted, new { @readonly = "readonly" })
                        </td>
                        <td class="Suffix">
                            <input type="text" readonly="readonly" value=".htm" id="@string.Format("Translations_{0}__AdrBldrSuffix", Model.LanguageIndex)">
                        </td>
                    </tr>
                </table>
            </fieldset>
        </li>
        <li class="notDisplayed">
            @Html.LabelFor(m => m.DirectURL)
            @Html.TextBoxFor(m => m.DirectURL)
            @Html.ValidationMessageFor(m => m.DirectURL)
        </li>
    </ul>
</fieldset>
